import javax.swing.*;

import java.awt.*;
import java.awt.event.*;

public class SideMenuPanel extends JPanel
{
	private NewRollDicePanel nrdp;
	//private JPanel jp;
	private playerpanel pp;
	private MenuOnBoard mb;
	private LogoPanel lp;
	
	public SideMenuPanel()
	{
		setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		lp = new LogoPanel();
		pp = new playerpanel();
		mb = new MenuOnBoard();
		nrdp = new NewRollDicePanel();

		add(lp);
		add(mb);
		add(pp);
		add(nrdp);
	} // end constructor
	
	public void rollDice()
	{
		nrdp.rollDice();
	}
	
	public int getDiceValue()
	{
		return nrdp.getDiceValue();
	}
	
	public boolean diceIsDoubles()
	{
		return nrdp.diceIsDoubles();
	}
	
	public boolean rollButtonClicked()
	{
		return nrdp.rollButtonClicked();
	}
	
	public void resetRollButtonClicked()
	{
		nrdp.resetRollButtonClicked();
	}
	
	public void setPlayerName(String name, int playerNum)
	{
		pp.setPlayerName(name, playerNum);
	}
	
	public void setCashValue(int value, int playerNum)
	{
		pp.setCashValue(value, playerNum);
	}
	
	public void setTotalWealth(int value, int playerNum)
	{
		pp.setTotalWorth(value, playerNum);
	}
	
	public void setRollButtonState(boolean state)
	{
		nrdp.setRollButtonState(state);
	}
	
	public void addProperty(String name, int playerNum)
	{
		pp.addProperty(name, playerNum);
	}
	
	public void addJailFreeCard(String name, int curPlayerNum)
	{
		pp.addJailFreeCard(name, curPlayerNum);
	}
	
	public void removeJailFreeCard(String Name, int playerNum)
	{
		pp.removeJailFreeCard(Name, playerNum);
	}
	
    public void setTradeButton(boolean state)
    {
    	mb.setTradeButton(state);
    }
    
    public void setBuildButton(boolean state)
    {
    	mb.setBuildButton(state);
    }

    public void setUnmortgageButton(boolean state)
    {
    	mb.setUnmortgageButton(state);
    }
    
    public void setMortgageButton(boolean state)
    {
    	mb.setMortgageButton(state);
    }

    public void setEndTurnButton(boolean state)
    {
    	mb.setEndTurnButton(state);
    }

    public void setCurPlayer(Player p)
    {
    	mb.setCurPlayer(p);
    }
    
    public boolean buildButtonClicked()
    {
    	return mb.buildButtonClicked();
    }
    
    public int getBuildReturnValue()
    {
    	return mb.getBuildReturnValue();
    }
    
    public void resetBuildReturnValue()
    {
    	mb.resetBuildReturnValue();
    }
    
    public void resetBuildClicked()
    {
    	mb.resetBuildClicked();
    }
    
    public boolean mortgageButtonClicked()
    {
    	return mb.mortgageButtonClicked();
    }
    
    public int getMortgageReturnValue()
    {
    	return mb.getMortgageReturnValue();
    }
    
    public void resetMortgageReturnValue()
    {
    	mb.resetMortgageReturnValue();
    }
    
    public void resetMortgageClicked()
    {
    	mb.resetMortgageClicked();
    }
        
/*	
    public boolean tradeButtonClicked()
    {
    	return mb.tradeButtonClicked();
    }
    
    public boolean unmortgageButtonClicked()
    {
    	return mb.unmortgageButtonClicked();
    }
    
    public boolean endTurnButtonClicked()
    {
    	return mb.endTurnButtonClicked();
    }
    
    public boolean quitButtonClicked()
    {
    	return mb.quitButtonClicked();
    }
*/
    public boolean rollIsDone()
    {
    	return nrdp.rollIsDone();
    }
} // end class